### 2. Instrument your application
**For Kubernetes deployments with zero-code instrumentation:**

```yaml
apiVersion: openlit.io/v1alpha1
kind: AutoInstrumentation
metadata:
  name: openlit-platform-instrumentation
  namespace: default
spec:
  selector:
    matchLabels:
      instrument: "true"
  python:
    instrumentation:
      provider: "openlit"
      version: "latest"
  otlp:
    endpoint: "YOUR_OPENLIT_PLATFORM_ENDPOINT"
    timeout: 30
  resource:
    environment: "production"
    serviceName: "my-ai-service"
```

Replace:
1. `YOUR_OPENLIT_PLATFORM_ENDPOINT` with your OpenLIT Platform endpoint from Step 1.
   * **Same cluster**: `http://openlit.openlit.svc.cluster.local:4318`
   * **External**: `https://your-openlit-domain.com:4318`

<Note>
When using the OpenLIT Operator with the OpenLIT Platform in the same cluster, the default endpoint `http://openlit.openlit.svc.cluster.local:4318` is automatically configured if no explicit endpoint is provided.
</Note>

Refer to the [OpenLIT Operator Documentation](/latest/operator/overview) for more advanced configurations and use cases.
